Aditya Gilra
CAMP 2016 @ Bangalore
In [1]:
%matplotlib inline
#%matplotlib qt
from brian2 import *
defaultclock.dt = 0.1*ms
In [4]:
eqs_neurons='''
inp : volt
dv/dt = (-v + inp)/(20*ms) : volt
'''
P=NeuronGroup(N=1000,model=eqs_neurons,\
threshold='v>=20*mV',reset='v=10*mV',\
refractory=10*ms,method='euler')
P.v = 0.*mV
P.inp = uniform(size=(1000)) * 40*mV
In [5]:
sm = SpikeMonitor(P)
sr = PopulationRateMonitor(P)
sm_vm = StateMonitor(P,'v',record=range(5))
run(100*ms, report='text')
figure()
plot(sm.t/ms,sm.i,',');
figure()
plot(sr.t/ms,sr.smooth_rate(width=5*ms)/Hz,',');
figure()
plot(sm_vm.t/ms,transpose(sm_vm.v/mV));
In [ ]:
# delta-function synapses
con = Synapses(P,P,'w:volt (constant)',on_pre='v_post+=w',method='euler')
con.connect(condition='i!=j',p=0.1)
con.delay = 1*ms
con.w['i<800'] = 0.1*mV
con.w['i>=800'] = -5*0.1*mV
In [1]:
%matplotlib inline
#%matplotlib qt
from brian2 import *
defaultclock.dt = 0.1*ms
eqs_neurons='''
inp : volt
dv/dt = (-v + inp)/(20*ms) : volt
'''
P=NeuronGroup(N=1000,model=eqs_neurons,\
threshold='v>=20*mV',reset='v=10*mV',\
refractory=2*ms,method='euler')
P.v = 0.*mV
P.inp = uniform(size=(1000)) * 40*mV
# delta-function synapses
con = Synapses(P,P,'w:volt (constant)',on_pre='v_post+=w',method='euler')
con.connect(condition='i!=j',p=0.1)
con.delay = 1*ms
con.w['i<800'] = 0.1*mV
con.w['i>=800'] = -5*0.1*mV
sm = SpikeMonitor(P)
sr = PopulationRateMonitor(P)
sm_vm = StateMonitor(P,'v',record=range(5))
run(100*ms, report='text')
figure()
plot(sm.t/ms,sm.i,',');
figure()
plot(sr.t/ms,sr.smooth_rate(width=5*ms)/Hz,',');
figure()
plot(sm_vm.t/ms,transpose(sm_vm.v/mV));
In [ ]:
inpfactor = 2
nu_thr = vth/(p*NE*J*tau)
Pinp = PoissonGroup(N=N,rates=inpfactor*nu_thr)
# connect these Pinp neurons to the P neurons
Plot a histogram of the co-eff of variation of inter-spike intervals
How can you increase it?
Try Gaussian instead of log-normal distribution of E-to-E synapses.